//
//  GWLoginRegisterController.m
//  百思不得姐
//
//  Created by qianfeng on 16/3/2.
//  Copyright © 2016年 高炜. All rights reserved.
//

#import "GWLoginRegisterController.h"

@interface GWLoginRegisterController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *loginLeftMargin;

@end

@implementation GWLoginRegisterController
- (IBAction)close {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}
- (IBAction)loginOrRegister:(UIButton *)sender {
    
    [self.view endEditing:YES];
    if (self.loginLeftMargin.constant==0) {
         self.loginLeftMargin.constant =-self.view.width;
        sender.selected =YES;
    }else
    {
        self.loginLeftMargin.constant =0;
        sender.selected =NO;
    }
   
    [UIView animateWithDuration:0.3 animations:^{
        [self.view layoutIfNeeded];
    }];
}

@end
